import request from '@/utils/request'

// 查询生产过程控制总列表
export function listControl(query) {
  return request({
    url: '/procontrol/control/list',
    method: 'get',
    params: query
  })
}

// 查询生产过程控制总详细
export function getControl(id) {
  return request({
    url: '/procontrol/control/' + id,
    method: 'get'
  })
}
// 查询派工工单详细
export function getOrderInfoPg(id) {
  return request({
    url: '/procontrol/control/getOrderInfoPg/' + id,
    method: 'get'
  })
}

// 审核生产过程控制总
export function shControl(id) {
  return request({
    url: '/procontrol/control/shControl/' + id,
    method: 'get'
  })
}
export function addOrderInfoPg(data) {
  return request({
    url: '/procontrol/control/addOrderInfoPg',
    method: 'post',
    data: data
  })
}
/*原材料入库生成派工单*/
// 全部接单
export function addRukuToOrderInfo(id) {
  return request({
    url: '/procontrol/control/addRukuToOrderInfo/' + id,
    method: 'get'
  })
}
// 查询生产过程控制总详细
export function handRead() {
  return request({
    url: '/procontrol/control/handRead',
    method: 'get'
  })
}

// 新增生产过程控制总
export function addControl(data) {
  return request({
    url: '/procontrol/control',
    method: 'post',
    data: data
  })
}

// 修改生产过程控制总
export function updateControl(data) {
  return request({
    url: '/procontrol/control',
    method: 'put',
    data: data
  })
}

// 删除生产过程控制总
export function delControl(id) {
  return request({
    url: '/procontrol/control/' + id,
    method: 'delete'
  })
}
